//
//  FMMainCollectionViewCell.m
//  XWZ_News_Work
//
//  Created by dllo on 16/1/11.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "FMMainCollectionViewCell.h"

@interface FMMainCollectionViewCell ()


@end

@implementation FMMainCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatSubview];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];

    
    self.imageV.frame = CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.width);
    self.labelName.frame = CGRectMake(self.contentView.frame.origin.x - 5 * WIDTH, self.imageV.frame.origin.y + self.imageV.frame.size.height + 5 * HEIGHT, self.contentView.frame.size.width - 10 * WIDTH, 20 * HEIGHT);
    self.labelTitle.frame = CGRectMake(self.contentView.frame.origin.x - 5 * WIDTH, self.labelName.frame.origin.y + self.labelName.frame.size.height + 5 * HEIGHT, self.contentView.frame.size.width - 10 * WIDTH, 40 * HEIGHT);
        
    
}

- (void)creatSubview
{
    self.backgroundColor = [UIColor whiteColor];
    
    self.imageV = [[UIImageView alloc] init];
//    self.imageV.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:self.imageV];
    
    self.labelTitle = [[UILabel alloc] init];
    self.labelTitle.text = @"网易新闻人人都来听网易新闻人人都来听";
    self.labelTitle.font = [UIFont systemFontOfSize:12.0 * WIDTH];
    self.labelTitle.numberOfLines = 2;
    [self.contentView addSubview:self.labelTitle];
    
    self.labelName = [[UILabel alloc] init];
    self.labelName.text = @"网易新闻";
    self.labelName.font = [UIFont systemFontOfSize:14.0 * WIDTH];
    [self.contentView addSubview:self.labelName];
    
    
    
    
}


@end
